package com.smart.model.convert;

import com.smart.model.dtomapper.ManageUserRegistrationDtoMapper;
import com.smart.model.domain.ManageUserRegistrationDO;
import com.smart.model.vo.ManageUserRegistrationVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class ManageUserRegistrationConvert {

    public static List<ManageUserRegistrationVO> buildManageUserRegistrationVoList(List<ManageUserRegistrationDO> manageUserRegistrationDOList) {
        if (CollectionUtils.isEmpty(manageUserRegistrationDOList)) {
            return Lists.newArrayList();
        }
        List<ManageUserRegistrationVO> manageUserRegistrationVOList = new ArrayList<>();
        for (ManageUserRegistrationDO manageUserRegistrationDO : manageUserRegistrationDOList) {
            manageUserRegistrationVOList.add(ManageUserRegistrationDtoMapper.INSTANCE.do2VO(manageUserRegistrationDO));
        }

        return manageUserRegistrationVOList;
    }
}
